<?php



class GenericObjectMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.GenericObjectMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('generic_objects');
		$tMap->setPhpName('GenericObject');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addForeignKey('OBJECTID', 'Objectid', 'int', CreoleTypes::INTEGER, 'uniqueIds', 'ID', true, null);

		$tMap->addColumn('OBJECT_TYPE', 'ObjectType', 'string', CreoleTypes::VARCHAR, false, 255);

		$tMap->addColumn('PARENT', 'Parent', 'string', CreoleTypes::BIGINT, false, null);

		$tMap->addColumn('IS_HISTO', 'IsHisto', 'boolean', CreoleTypes::BOOLEAN, false, null);

		$tMap->addColumn('DELETED', 'Deleted', 'boolean', CreoleTypes::BOOLEAN, false, null);

		$tMap->addColumn('ORDER_RANK', 'OrderRank', 'float', CreoleTypes::FLOAT, false, null);

		$tMap->addColumn('DELETED_AT', 'DeletedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

		$tMap->addColumn('CREATED_AT', 'CreatedAt', 'int', CreoleTypes::TIMESTAMP, false, null);

	} 
} 